<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对象说是</title>
</head>

<body>
    <script>
        let obj = {
            name: '张三',
            age: 18,
            sex: 'man',
        }
        let TimeKeeper = {
            name: 'ovo',
            age: 1000000,
            sex: 'man',
            like: 'play game',
            'user-name': 'broname'
        }
        let goods = {
            name: '可口可乐',
            num: 1000000,
            weight: 20 + 'g',
            address: '成都',


        }

        document.write(JSON.stringify(goods))//转换成字符串输出
        // 上面打印的方法默认是字符串
        // document.write(goods.name)
        //增删改查
        //改 对象名.属性=新属性
        goods.name = '小米10plus'
        document.write(goods.name)
        //删 delete 对象名.属性
        goods.color = pink
document.write(goods)
        //增 对象名.新属性名 = 属性




    </script>
</body>

</html>